﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _703主抽气器试验台
{
    public partial class taskForm : Form
    {
        public taskForm()
        {
            InitializeComponent();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = !timer1.Enabled;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            Random r=new Random();
            float t = r.Next(200, 300)/10.0f;
            ListViewItem li = listView1.Items[0];
            li.SubItems[1].Text = t.ToString("0.0");
            chart1.Series[0].Points.AddY(t);
            
            t = r.Next(200, 300) / 10.0f;
            li = listView1.Items[1];
            li.SubItems[1].Text = t.ToString("0.0");
            chart1.Series[1].Points.AddY(t);

            textBox1.AppendText("获得采集数据T01、T02\r\n");
        }
    }
}
